<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace utiles;

/**
 * Description of Config
 *
 * @author Jorge
 */
class Config {

    //put your code here

    public static function conectarPDO() {
        try {
        	//$gbd = new \PDO('mysql:host=localhost;dbname=sistemaversal', "root", "");
//            $gbd = new \PDO('mysql:host=serverversal.ddns.net;dbname=sistemaversal_desa', "desarrollo", "desarrollo");
//            $gbd->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
            $gbd = new \PDO('mysql:host=localhost;dbname=sistemaversal', "sistemaversal", "83031771"); 
            return $gbd;
        } catch (\PDOException $e) {
            return false;
        }
    }

    public static function conectar() {
//        $conexion = mysql_connect("serverversal.ddns.net", "desarrollo", "desarrollo");
        $conexion=mysql_connect("localhost","sistemaversal","83031771");
        //$conexion=mysql_connect("localhost","root","");
        //mysql_select_db("sistemaversal_desa");
        mysql_select_db("sistemaversal");
        return $conexion;
    }

}
